
import { ajaxPromise } from "./ajax.js"

const isExistUser = data => ajaxPromise({
    type: "get",
    url: "/user/isExistUser",
    data: data,
    dataType: "json",
});
const isExistPhone = data => ajaxPromise({
    type: "get",
    url: "/user/isExistPhone",
    data: data,
    dataType: "json",
});

const isExistEmail = data => ajaxPromise({
    type: "get",
    url: "/user/isExistUser",
    data: data,
    dataType: "json",
});

const register = data => ajaxPromise({
    type: "post",
    url: "/user/login",
    data: data,
    dataType: "json"
})

const addToShoppingCarAPI = data => ajaxPromise({
    type: "post",
    url: "/car/add",
    data: data,
    dataType: "json",
    header: {
        token: localStorage.getItem("token"),
        a: 1,
        b: 2
    }
})



export {
    addToShoppingCarAPI
}







